
import UIKit
import Reusable

class MainHistoryTableViewCell: UITableViewCell,NibReusable {

    @IBOutlet weak var tipView: UIView!
    @IBOutlet weak var historyImg: UIImageView!
    @IBOutlet weak var nameLabel: UILabel!
    
    override func awakeFromNib() {
        super.awakeFromNib()
        selectionStyle = .none
        backgroundColor = .clear
        
        historyImg.contentMode = .scaleAspectFill
        historyImg.clipsToBounds = true
        historyImg.layer.cornerRadius = 10
        historyImg.layer.masksToBounds = true
        tipView.clipsToBounds = true
        tipView.layoutIfNeeded()
        let cornerRadius: CGFloat = 10.0
        let maskPath = UIBezierPath(roundedRect: tipView.bounds,
                                    byRoundingCorners: [.bottomLeft, .bottomRight],
                                    cornerRadii: CGSize(width: cornerRadius, height: cornerRadius))
        let maskLayer = CAShapeLayer()
        maskLayer.path = maskPath.cgPath
        tipView.layer.mask = maskLayer
        
        // Initialization code
    }

    override func setSelected(_ selected: Bool, animated: Bool) {
        super.setSelected(selected, animated: animated)

        // Configure the view for the selected state
    }
    
}
